#include<stdio.h>
#include<math.h>

extern float suma(float a, float);
extern double sumad(double a, double b);
extern double mul(double a, double b);extern double areaCirculo(float r);
extern double potencia(double x, int y);
extern double pot(double x, double y);
extern double func(float x, float y);
extern double func2(double* A, double* B, unsigned short n);
extern unsigned fib(unsigned n);
extern void dondeEstaLaAbejita(float r, float angulo, float* x, float* y, float* z);
extern float* rotarPuntos(float *v, float angulo, unsigned short n);

void pf(float x){printf("%.2f\n",x);}
void pfpv(float* v,unsigned short n){unsigned short i;for(i=1;i<2*n;i+=2) printf("%.1f,%.1f | ",v[i-1],v[i]); printf("\n");}
void pd(double x){printf("%.4f\n",x);}

int main(){
	double A[]={1.,2.,3.,4.,5.,6.,7.,8.};
	double B[]={1.,2.,3.,4.,5.,6.,7.,8.};
	pf(suma(1.5,2.4));
	pd(sumad(1.5,2.4));
	pd(mul(1.5,2.4));
	pd(areaCirculo(2.));
	pd(potencia(2.,3));
	pd(pot(2.,3.));
	pd(func(1.,1.));
	pd(func2(A,B,8));
	printf("%u\n",fib(46));
	float x,y,z; dondeEstaLaAbejita(1.,1.,&x,&y,&z); printf("%.2f\t%.2f\t%.2f\n",x,y,z);
	float pts[]={0.,0., 1.,0., 0.,1., 1.,1.}; pfpv(rotarPuntos(pts, 45., 4),4);
	// Deberia ser: 0.0,0.0 | 0.7,0.7 | -0.7,0.7 | 0.0,1.4 | 
	return 0;
}
